package com.glc.hms.common.tree;

import com.alibaba.fastjson.annotation.JSONField;
import lombok.Getter;
import lombok.Setter;

import java.util.List;

/**
 * 返回给前端的菜单树
 * @author Santa
 * @since 2019/11/26
 */
@Getter
@Setter
public class MenuTreeInfo implements TreeEntity<MenuTreeInfo> {
    private static final long serialVersionUID = -5445441200186256826L;

    /**
     * 菜单id
     */
    private Long id;

    /**
     * 父菜单id
     */
    private Long parentMenuId;

    /**
     * 菜单标题
     */
    private String menuTitle;

    /**
     * 菜单图标
     */
    private String menuIcon;

    /**
     * 菜单URL
     */
    private String menuUrl;

    /**
     * 是否展开，默认都是fasle
     */
    private boolean isFold = false;

    /**
     * 孩子节点信息
     */
    private List<MenuTreeInfo> children;

    /**
     * 扩展信息
     */
    private List<Object> action;




    @Override
    @JSONField(serialize=false)
    public Long getId() {
        return id;
    }

    @Override
    @JSONField(serialize = false)
    public Long getParentId() {
        return parentMenuId;
    }

    @Override
    public void setChildList(List<MenuTreeInfo> childList) {
        this.children = childList;
    }
}























